package com.levy.contronller.lamdaTest;

import java.util.Arrays;
import java.util.List;
import java.util.stream.Collectors;

public class Test3 {

    public static void main(String[] args) {
        //()--方法参数  {}--方法执行
        Interface1 i1 = () -> {
        };
        System.out.println(i1.getClass().getInterfaces()[0]);

        Interface2 i2 = () -> {
        };
        System.out.println(i2.getClass().getInterfaces()[0]);

        new Thread(() -> System.out.println("123")).start();

        List<String> list = Arrays.asList("hell","world");
        //                                       //输入参数-->>返回值
        List<String> collect = list.stream().map(o -> o.toUpperCase()).collect(Collectors.toList());
        // 方法引用
        List<String> collect1 = list.stream().map(String::toUpperCase).collect(Collectors.toList());


    }
}

@FunctionalInterface
interface Interface1 {
    void intMethod1();
}


@FunctionalInterface
interface Interface2 {
    void intMethod2();
}
